#ifndef _SINGLETON_CPP
#define _SINGLETON_CPP

#include "Share.h"

template<class TYPE>
TYPE *Singleton<TYPE>::instance_ = Singleton<TYPE>::instance_i( );

template<class TYPE>
TYPE *Singleton<TYPE>::instance_i( )
{
	static TYPE *type = 0;

	if( type == 0 )
		type = new TYPE;

	return type;
}

template<class TYPE>
TYPE *Singleton<TYPE>::instance( )
{
	return instance_i( );
}

// template<class TYPE>
// void Singleton<TYPE>::use(TYPE *&t)
// {
//
// }

#endif

